Manages the rendering contexts available in the component. More...
Public Member Functions | |
~RenderContextManager () | |
const std::unordered_map< nkWinUi::GraphicsWindow *, RenderContext * > & | getRenderContextMap () const |
RenderContext * | getRenderContextOf (nkWinUi::GraphicsWindow *win) const |
RenderContext * | getActiveRenderContext () const |
RenderContext * | getDefaultRenderContext () const |
nkWinUi::GraphicsWindow * | getWindowOf (RenderContext *context) const |
RenderContext * | createRenderContextFor (nkWinUi::GraphicsWindow *win) |
RenderContext * | createRenderContextAndWindow (const RenderContextDescriptor &contextDesc) |
RenderContext * | createRenderContextAndWindowFromConfig () |
void | activateContextOf (nkWinUi::GraphicsWindow *win) |
void | activateContext (RenderContext *context) |
void | eraseFor (nkWinUi::GraphicsWindow *win) |
Manages the rendering contexts available in the component.
The manager is responsible for the memory it allocates. External code should not delete it.
nkGraphics::RenderContextManager::~RenderContextManager | ( | ) |
Destructor.
const std::unordered_map<nkWinUi::GraphicsWindow*, RenderContext*>& nkGraphics::RenderContextManager::getRenderContextMap | ( | ) | const |
RenderContext* nkGraphics::RenderContextManager::getRenderContextOf | ( | nkWinUi::GraphicsWindow * | win | ) | const |
Retrieves the context associated to a window.
win | The window which context is needed. |
RenderContext* nkGraphics::RenderContextManager::getActiveRenderContext | ( | ) | const |
RenderContext* nkGraphics::RenderContextManager::getDefaultRenderContext | ( | ) | const |
nkWinUi::GraphicsWindow* nkGraphics::RenderContextManager::getWindowOf | ( | RenderContext * | context | ) | const |
Retrieves the window associated to a context.
context | The context which window is needed. |
RenderContext* nkGraphics::RenderContextManager::createRenderContextFor | ( | nkWinUi::GraphicsWindow * | win | ) |
Creates a render context that will be attached to an external window.
win | The external window to attach the render context to. |
RenderContext* nkGraphics::RenderContextManager::createRenderContextAndWindow | ( | const RenderContextDescriptor & | contextDesc | ) |
Creates a render context and its associated window.
contextDesc | The description of the context to create. |
RenderContext* nkGraphics::RenderContextManager::createRenderContextAndWindowFromConfig | ( | ) |
Creates a render context and its window, from the configuration currently set. See ConfigManager.
void nkGraphics::RenderContextManager::activateContextOf | ( | nkWinUi::GraphicsWindow * | win | ) |
Activates a context and prepares the rendering pipeline for all its defined parameters.
win | The window from which the context should be activated. |
void nkGraphics::RenderContextManager::activateContext | ( | RenderContext * | context | ) |
Activates a context and prepares the rendering pipeline for all its defined parameters.
context | The context to activate. |
void nkGraphics::RenderContextManager::eraseFor | ( | nkWinUi::GraphicsWindow * | win | ) |
Erases and frees the memory of a context.
win | The window from which the context should be deleted. |